#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdbool.h>
#include<stdlib.h>
#include<assert.h>

typedef int HPDatatype;
typedef struct Heap {
	HPDatatype* a;
	int size;
	int capacity;
}HP;

void AdjustDown(HPDatatype* a, int n, int parent);
void Adjustup(HPDatatype* a, int child);


void HeapInit(HP* php);
void HeapDestroy(HP* php);
void HeapPush(HP* php, HPDatatype x);
void HeapPop(HP* php);
HPDatatype HeapTop(HP* php);
bool HeapEmpty(HP* php);
int HeapSize(HP* php);
